
const app = getApp();

Component({
  /**
   * 组件的属性列表
   */
  properties: {
      schoolList: {
        type: Array,
        value: null
      },
      listBg: {
        type: String,
        value: '#fff'
      },
      select: {
        type: Boolean,
        value: false
      },
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
      //去机构详情
      detail(e) {
        let index = app.getBindParam(e, 'index');
        console.log(this.data)
        if(this.data.select) {
          this.triggerEvent('selectCallback', {'index':index});
        } else {

          wx.navigateTo({
            url: '/pages/institufirst/index?schoolId='+this.data.schoolList[index]['schoolId']
          })
        }
      }
  }
})
